Page({
    data: {
        address: {},
        totalPrice: 0,
        checkedGoods: [],
        checkLength: 0,
        total: 0,
        checked: [true, false, false],
        ways: ['余额支付', '微信支付', '支付宝支付'],

    },
    onShow() {
        let address = wx.getStorageSync('address')
        let checkGoods = wx.getStorageSync('checkGoods')
        let c = wx.getStorageSync("checked")
        let price = wx.getStorageSync('total')
        let time = wx.getStorageSync("dateDone" )
        for (let i in c) {
            if (c[i] === true) {
                this.setData({
                    way: this.data.ways[i]
                })
            }
        }
        this.setData({
            address:address,
            checkGoods:checkGoods,
            price:(price/100).toFixed(2),
            time
        })
        console.log(checkGoods)
    }
})